using System;
using System.Xml;
using System.Xml.Serialization;
using System.Runtime.Serialization;
using System.Collections.Generic;

namespace GalaxyZoo.Client.Model
{
    [DataContract]
    [XmlType(AnonymousType = true)]
    [XmlRoot(IsNullable = false, ElementName="favourite", Namespace="")]
    public class Favourite : AbstractGalaxyZooObject
    {
        /// <summary>
        /// Gets/Set the Id property.
        /// </summary>
        [DataMember]
        [XmlElement(ElementName="id")]
        public int Id { get; set; }

        /// <summary>
        /// Gets/Set the CreatedOn property.
        /// </summary>
        [DataMember]
        [XmlIgnore()]
        public DateTime? CreatedOn { get; set; }

        /// <summary>
        /// This property is use for Serializing and Deserializing DateTime and
        /// should not be used as part of the API.
        /// </summary>
        [XmlElement(ElementName="created_on")]
        public string CreatedOn_Internal
        {
            get { return base.FromDateTime(this.CreatedOn); }
            set { this.CreatedOn = base.ToDateTime(value); }
        }

        /// <summary>
        /// Gets/Set the AssetId property.
        /// </summary>
        [DataMember]
        [XmlElement(ElementName="asset_id")]
        public int AssetId { get; set; }

        /// <summary>
        /// Gets/Set the AssetLocation property.
        /// </summary>
        [DataMember]
        [XmlElement(ElementName="asset_location")]
        public string AssetLocation { get; set; }

        /// <summary>
        /// Gets/Set the ProjectId property.
        /// </summary>
        [DataMember]
        [XmlElement(ElementName="project_id")]
        public int ProjectId { get; set; }

        /// <summary>
        /// Gets/Set the ExternalRef property.
        /// </summary>
        [DataMember]
        [XmlElement(ElementName="external_ref")]
        public string ExternalRef { get; set; }
    }
}
